<div class="container">
    <h1 id="pkg-overview">package aes</h1>
    <p><code>import "crypto/aes"</code>
    </p><p>aes包实现了AES加密算法，参见U.S. Federal Information Processing Standards Publication 197。</p>
    
    
		
        
        
        
        
    
    <h2 id="pkg-constants">Constants </h2>
    <pre>const <span id="BlockSize">BlockSize</span> = 16</pre>
    <p>AES字节块大小。</p>
    <h2 id="KeySizeError">type <a href="https://github.com/golang/go/blob/master/src/crypto/aes/cipher.go?name=release#21" title="View Source">KeySizeError</a> </h2>
    <pre>type KeySizeError <a href="builtin.htm#int">int</a></pre>
    <h3 id="KeySizeError.Error">func (KeySizeError) <a href="https://github.com/golang/go/blob/master/src/crypto/aes/cipher.go?name=release#23" title="View Source">Error</a> </h3>
    <pre class="funcdecl">func (k <a href="#KeySizeError">KeySizeError</a>) Error() <a href="builtin.htm#string">string</a></pre>
    <h2 id="NewCipher">func <a href="https://github.com/golang/go/blob/master/src/crypto/aes/cipher.go?name=release#31" title="View Source">NewCipher</a> </h2>
    <pre class="funcdecl">func NewCipher(key []<a href="builtin.htm#byte">byte</a>) (<a href="crypto/cipher.htm">cipher</a>.<a href="crypto/cipher.htm#Block">Block</a>, <a href="builtin.htm#error">error</a>)</pre>
    <p>创建一个cipher.Block接口。参数key为密钥，长度只能是16、24、32字节，用以选择AES-128、AES-192、AES-256。</p>
</div>